from game.gamesrc.wild.wild import Wilderness
from game.gamesrc.wild.wild import WildLayer

class MyWild(Wilderness):
    def at_object_creation(self):
        super(MyWild, self).at_object_creation()
        layers = {}
        layer = WildLayer('base')
        layer.load_map("../game/gamesrc/wild/wild.txt")
        self.db.wild = layer.map
        layers[layer.key] = layer
        layer = WildLayer('name', filename="../game/gamesrc/wild/names.txt")
        layers[layer.key] = layer
        layer = WildLayer('colors', filename="../game/gamesrc/wild/colors.txt")
        layers[layer.key] = layer
        layer = WildLayer('desc', filename="../game/gamesrc/wild/descs.txt")
        layers[layer.key] = layer
        layer = WildLayer('locks', filename="../game/gamesrc/wild/locks.txt")
        layers[layer.key] = layer
        self.db.layers = layers
        self.db.x_lenght = len(self.db.wild[0])
        self.db.y_lenght = len(self.db.wild)

